package com.mytest.utils;

import com.google.gson.Gson;

import java.lang.reflect.Type;

/**
 * Created by shixi  on 2019/4/8
 */
public class A extends B {

    //静态变量
    static int i = 1;
    //静态代码块
    static{
        System.out.println("Class A1: static blocks i = " + i);
    }

    //静态代码块
    static {
        i++;
        System.out.println("Class A2 :static blocks i = " + i);
    }

    //非静态变量
    int j = 1;
    //构造函数
    public A(){
        super();
        i++;
        j++;
        System.out.println("constructor A : i = " + i);
        System.out.println("constructor A : j = " + j);
    }

    //非静态语句块
    {
        i++;
        j++;
        System.out.println("非静态语句块 A : i = " + i);
        System.out.println("非静态语句块 A : j = " + j);
    }
    //非静态方法
    @Override
    public void bDisplay(){
        i++;
        System.out.println("非静态方法 A : i = " + i);
        System.out.println("非静态方法 A : j = " + j);
    }

    //静态方法
    public static void bTest(){
        i++;
        System.out.println("静态方法 A : i = " + i);


        String sss = "{\"operationType\":\"U\",\"blackList\":{\"relationId\":123,\"name\":\"三四十qqqqaaaa\",\"tenantId\":\"prm\",\"productId\":\"task\",\"valueType\":\"user\",\"value\":" +
                "[{\"id\":112,\"groupId\":123,\"unitId\":36,\"posId\":611111111420,\"posName\":\"黑龙江龙采业务接口人\",\"posType\":\"渠道接口人-灯塔,\",\"ucId\":43244042,\"account\":\"chengwei02\",\"userName\":\"chengwei\",\"email\":\"chengwei@baidu.com\",\"createTime\":\"Nov 8, 2021 5:10:00 PM\",\"creatorPosId\":611111111420,\"creatorPosName\":\"黑龙江龙采业务接口人\",\"creatorUcId\":43244042,\"creatorAccount\":\"chengwei02\",\"creatorName\":\"chengwei\",\"creatorEmail\":\"chengwei@baidu.com\",\"refUnit\":\"36\"}],\"createTime\":\"Nov 8, 2021 7:38:16 PM\",\"updateTime\":\"Nov 8, 2021 7:38:16 PM\",\"authType\":1,\"authValue\":[{\"id\":244,\"posId\":611111111420,\"ucId\":43244042}]}}";
        Gson gson = new Gson();
//        Type type = new TypeToken<MqMsgData<BlackListMqDto>>() {
//        }.getType();
//
//        MqMsgData<BlackListMqDto> mqMsgResp = gson.fromJson(sss, type);
    }
}
